.\" $Id: PAPI_list_threads.3,v 1.1.2.1 2006/10/25 10:43:27 mucci Exp $
.TH PAPI_list_threads 3 "October, 2006" "PAPI Programmer's Reference" "PAPI"

.SH NAME
PAPI_list_threads \- list the registered thread ids
.SH SYNOPSIS

C Interface

.nf
.B #include <papi.h>
.BI "int PAPI_list_threads(PAPI_thread_id_t *" id ", int *" number ");"
.fi

Fortran Interface

.nf
.B <none>
.fi

.SH DESCRIPTION
.LP
.B PAPI_list_threads(\|)
returns to the caller a list of all thread ID's known to PAPI. 
.LP
This call assumes an initialized PAPI library.

.SH ARGUMENTS
.I *id 
-- A pointer to a preallocated array. This may be NULL 
to only return a count of threads. No more than 
.I *number
codes will be stored in the array.
.LP
.I *number 
-- An input and output parameter, input specifies the number of allocated elements
in 
.I *id
(if non-NULL) and output specifies the number of threads.
.LP

.SH RETURN VALUES
.TP
.B "PAPI_OK"
The call returned successfully.
.TP
.B "PAPI_EINVAL"
One or more of the arguments is invalid.

.SH EXAMPLES
.nf
.if t .ft CW
/* Reserved for example usage */
.if t .ft P
.fi

.SH BUGS
This function has no known bugs.

.SH SEE ALSO
.BR PAPI_thread_init "(3), " PAPI_thread_id "(3),"
.BR PAPI_register_thread "(3), " PAPI_unregister_thread "(3),"
.BR PAPI_get_thr_specific "(3), " PAPI_set_thr_specific "(3), " PAPI "(3)"
